package cultu.community.service;

import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.community.message.Community;
import cultu.community.message.CommunityCriteria;
import cultu.community.message.CommunityList;
import cultu.community.message.CommunityScenario;

/**
 * Community service class.
 * @author Marc-Antoine
 *
 */
@RemoteDestination(id="communityService", channel="my-amf")
public interface CommunityService
{

  /**
   * Get the universes.
   *
   * @param cScenario the scenario.
   * @param cCriteria the criterias.
   * @return the universes
   */
  CommunityList getUniverses(final CommunityScenario cScenario, final CommunityCriteria cCriteria);
  
  /**
   * Get the communities.
   *
   * @param universe the parent universe.
   * @param cScenario the scenario.
   * @param cCriteria the criterias.
   * @return the categories
   */
  CommunityList getCategories(final Community universe, final CommunityScenario cScenario, final CommunityCriteria cCriteria);

  /**
   * Get universe by code.
   *
   * @param universeCode the universe code.
   * @return the universe by code
   */
  Community getUniverseByCode(final String universeCode);
  
  /**
   * Get category by universe code and category code.
   *
   * @param universeCode the universe code.
   * @param categoryCode the category code.
   * @return the category by code
   */
  Community getCategoryByCode(final String universeCode, final String categoryCode);
  
  /**
   * find registration communities.
   *
   * @param cScenario the scenario.
   * @param cCriteria the criteria.
   * @return the community list
   */
  CommunityList findRegistrationCommunities(final CommunityScenario cScenario, final CommunityCriteria cCriteria);
  
  /**
   * Find all communities.
   *
   * @param cScenario the scenario.
   * @param cCriteria the criteria.
   * @return the community list
   */
  CommunityList findAllCommunities(final CommunityScenario cScenario, final CommunityCriteria cCriteria);
  
}
